
<template>
  <div v-if="hero">
    <p>{{test}}</p>
    <h2>{{hero.name}} details!</h2>
    <div><label>id: </label>{{hero.id}}</div>
    <div>
      <label>name: </label>
      <input v-model="hero.name" placeholder="name"/>
    </div>
  </div>
</template>
<script>
  export default {
    name: 'HeroDetail',
    props: {
      test: {
        type: String,
        required: false
      },
      hero: {
        type: Object,
        required: false
      }
    }
  }
</script>
